from rest_framework import serializers
from .models import User, Category, Course,Comment,Flows,Codes,Orders


class UserModelSer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = "__all__"


class CatModelSer(serializers.ModelSerializer):

    class Meta:
        model = Category
        fields = "__all__"

    # def create(self, data):
    #     return Category.objects.create(
    #         **data
    #     )


class CouModelSer(serializers.ModelSerializer):

    class Meta:
        model = Course
        fields = "__all__"


class CommModelSer(serializers.ModelSerializer):

    class Meta:
        model = Comment
        fields = "__all__"

    # def create(self, data):
    #     return Comment.objects.create(
    #         **data
    #     )
    #


class FlowModelSer(serializers.ModelSerializer):

    class Meta:
        model = Flows
        fields = "__all__"


class CodesModelSer(serializers.ModelSerializer):

    class Meta:
        model = Codes
        fields = "__all__"


class OrdersModelSer(serializers.ModelSerializer):

    class Meta:
        model = Orders
        fields = "__all__"

